package com.zdzx.model.service.base.vo;

import java.io.Serializable;

import org.springframework.util.StringUtils;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zdzx.model.constant.SystemConfig;
import com.zdzx.model.entity.BaseEntity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "租户", description = "租户")
@TableName("base_tenant")
public class Tenant extends BaseEntity implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@ApiModelProperty(value = "租户Id", name = "tenantId")
	private String tenantId;
	@ApiModelProperty(value = "租户名称", name = "tenantName")
	private String tenantName;
	@ApiModelProperty(value = "logo", name = "logo")
	private String logo;
	@ApiModelProperty(value = "租户描述", name = "desc")
	@TableField("`desc`")
	private String desc;
	@ApiModelProperty(value = "联系人", name = "linkman")
	private String linkman;
	@ApiModelProperty(value = "联系电话", name = "contactNumber")
	private String contactNumber;
	@ApiModelProperty(value = "地址", name = "address")
	private String address;
	@ApiModelProperty(value = "创建人", name = "createUser")
	private String createUser;
	@ApiModelProperty(value = "修改人", name = "updateUser")
	private String updateUser;
	@ApiModelProperty(value = "状态", name = "status")
	private String status;
	@ApiModelProperty(value = "企业认证地址", name = "authUrl")
	private String authUrl;
	
	
	public void setLogo(String logo,boolean flag) {
		if(!StringUtils.isEmpty(logo)&&!logo.contains(SystemConfig.ossIp)&&flag)
		this.logo = SystemConfig.ossIp+logo;
		else
		this.logo=logo;
	}
	public void setLogo(String logo) {
		if(!StringUtils.isEmpty(logo)&&!logo.contains(SystemConfig.ossIp))
		this.logo = SystemConfig.ossIp+logo;
		else
		this.logo=logo;
	}
}
